package ThreadTest;

public class Dome20 {
    public static void main(String[] args) throws InterruptedException{
        Object object = new Object();
        System.out.println("等待之前...");
        synchronized(object) {
            object.wait(1000);
        }
        System.out.println("等待之后...");
    }
}
